package com.amikomgamedev.ramashinta.entity;

import com.amikomgamedev.ramashinta.ServerData;
import com.amikomgamedev.ramashinta.Utils;
import com.amikomgamedev.ramashinta.game.Game_Data;
import com.amikomgamedev.ramashinta.game.Game_Define;
import com.amikomgamedev.ramashinta.graphic.Graphic_Detach;

public class Entity_Platform implements Game_Data, Game_Define {
	private int tipePlatform;
	private final int tipe1=0;
	private final int tipe2=1;
	private final int tipe3=2;
	private final int tipe4=3;
	private final int tipe5=4;
	private Graphic_Detach graphic;
	float PosX, PosY;
	
	public Entity_Platform(float posX, float posY, Graphic_Detach graph, int tipe){
		PosX = posX;
		PosY = posY;
		graphic = graph;
		tipePlatform = tipe;
		graphic.createGameplayPf();
		switch (tipePlatform)
		{
			case 0:
			{
				graphic.spr_Gameplay_bg.attachChild(graphic.spr_Gameplay_Pf[tipe1]);
				Utils.TRACE("attached pf");
				graphic.spr_Gameplay_Pf[tipe1].setPosition(PosX, PosY);
				
			}
			break;
			case 1:
			{
				graphic.spr_Gameplay_bg.attachChild(graphic.spr_Gameplay_Pf[tipe2]);
				graphic.spr_Gameplay_Pf[tipe2].setPosition(PosX, PosY);
				
			}
			break;
			case 2:
			{
				graphic.spr_Gameplay_bg.attachChild(graphic.spr_Gameplay_Pf[tipe3]);
				graphic.spr_Gameplay_Pf[tipe3].setPosition(PosX, PosY);
				
			}
			break;
			case 3:
			{
				graphic.spr_Gameplay_bg.attachChild(graphic.spr_Gameplay_Pf[tipe4]);
				graphic.spr_Gameplay_Pf[tipe4].setPosition(PosX, PosY);
				
			}
			break;
			case 4:
			{
				Utils.TRACE("attached pf");
				graphic.spr_Gameplay_bg.attachChild(graphic.spr_Gameplay_Pf[tipe5]);
				graphic.spr_Gameplay_Pf[tipe5].setPosition(PosX, PosY);
				
			}
			break;
		}
	}

}
